<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright 2011 KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: view-normal.tpl 2011-03-09 01:11:30 idris $
 * @author     Idris
 */
?>

<h2>
  <?php echo $this->htmlLink($this->voting->getHref(), $this->voting->getTitle()); ?> »
  <?php echo $this->htmlLink($this->participant->getHref(), $this->participant->getTitle()); ?>
</h2>

<p class="description">
  <?php echo $this->participant->getDescription(); ?>
</p>

<div class="layout_middle">
  
<div class="vote_photo_participant">
  <div>
    <div>
      <div class="etc-info">
        <ul class="misc">
          <?php if ($this->participant->view_count): ?>
            <li class="views"><?php echo $this->translate(array('%s view', '%s views', $this->participant->view_count), $this->participant->view_count); ?></li>
          <?php endif; ?>
          <?php if ($this->participant->comment_count): ?>
            <li class="comments"><?php echo $this->translate(array('%s comment', '%s comments', $this->participant->comment_count), $this->participant->comment_count); ?></li>
          <?php endif; ?>
          <?php $likeCount = $this->participant->likes()->getLikeCount(); if ($likeCount): ?>
            <li class="likes"><?php echo $this->translate(array('%s like', '%s likes', $likeCount), $likeCount); ?></li>
          <?php endif; ?>
          <?php if ($this->participant->vote_count): ?>
            <li class="votes"><?php echo $this->translate(array('%s vote', '%s votes', $this->participant->vote_count), $this->participant->vote_count); ?></li>
          <?php endif; ?>
        </ul>
        <div class="clr"></div>
      </div>
      <?php echo  $this->itemPhoto($this->participant, ''); ?>
    </div>
    <div class="ratings">
      <?php echo $this->objectRate($this->participant, $this->canVote); ?>
    </div>
    <div class="options">
      <?php echo $this->translate('Added by ');?>
      <?php echo $this->htmlLink($this->participant->getOwner()->getHref(), $this->participant->getOwner()->getTitle(), array('class' => 'kow-tip-element', 'id' => 'participant-'.$this->participant->getGuid())); ?>
      <?php echo $this->timestamp($this->participant->creation_date) ?>

    - <?php echo $this->htmlLink(Array('module'=> 'activity', 'controller' => 'index', 'action' => 'share', 'route' => 'default', 'type' => 'vote_participant', 'id' => $this->participant->getIdentity(), 'format' => 'smoothbox'), $this->translate("Share"), array('class' => 'smoothbox')); ?>
    - <?php echo $this->htmlLink(Array('module'=> 'core', 'controller' => 'report', 'action' => 'create', 'route' => 'default', 'subject' => $this->participant->getGuid(), 'format' => 'smoothbox'), $this->translate("Report"), array('class' => 'smoothbox')); ?>

      <?php if (!$this->voting->isFinished()): ?>
        <?php if ($this->participant->isOwner($this->viewer) || $this->voting->isOwner($this->viewer)): ?>
          - <?php echo $this->htmlLink($this->url(array('controller' => 'vote', 'action' => 'disqualify', 'format' => 'smoothbox', 'id' => $this->participant->getIdentity()), 'vote_general'), $this->translate('Disqualify'), array('class' => 'smoothbox delete')); ?>
        <?php endif; ?>
      <?php endif; ?>
      
    - <?php echo $this->htmlLink($this->url(array('controller' => 'promotion', 'action' => 'promote', 'format' => 'smoothbox', 'guid' => $this->participant->getGuid()), 'kowcore_extended'), $this->translate('Promote'), array('class' => 'smoothbox promote')); ?>
    </div>
  </div>
</div>

<br />

<div class="vote_photo_participant_comments">
  <?php echo $this->action("list", "comment", "core", array("type" => "vote_participant", "id" => $this->participant->getIdentity())); ?>
</div>

</div>